<!DOCTYPE html>
<html>
<head>
	<title>立普威陆IPv6域名解析系统</title>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width,initial-scale=1.0">
	<style type="text/css">
		section, h4, div{margin: 0; padding: 0; box-sizing: border-box;}
		.m-login-box{
			position: absolute;
			left: 0;
			top: 200px;
			bottom: 0;
			right: 0;
			width: 400px;
			height: 240px;
			margin: 0 auto;
			border-radius: 5px;
		}
		.m-login-box h4{ text-align: center; margin: 10px; }
		.m-form-item{ margin: 25px 0; }
		.m-form-item:last-child{ margin-top: 30px; text-align: center;}
		.m-form-item label{
			display: inline-block;
			width: 100px;
			text-align: right;
			line-height: 36px;
			font-size: 14px;
		}
		.m-form-item input{
			display: inline-block;
			line-height: 24px;
			padding: 5px 8px;
			border: 1px solid #dcdcdc;
			border-radius: 4px;
			width: 240px;
			transition: border-color 258ms ease-in-out;
		}
		.m-form-item button{
			display: inline-block;
			width: 120px;
			text-align: center;
			line-height: 34px;
			background: #39ADFF;
			border: 1px solid #39ADFF;
			border-radius: 2px;
			cursor: pointer;
			color: #fff;
			font-size: 16px;
		}
		.m-form-item input:focus{ outline: none; border-color: #39ADFF;	}
		.m-form-item button:focus{ outline: none; }
	</style>
</head>
<body>
	<section class="m-login-box">
		<h4>立普威陆IPv6域名解析系统</h4>
		<div class="m-form-item">
			<label>登陆名：</label>
			<input type="text" name="" placeholder="登陆名">
		</div>
		<div class="m-form-item">
			<label>密码：</label>
			<input type="password" name="" placeholder="密码">
		</div>
		<div class="m-form-item">
			<button>登陆</button>
		</div>
	</section>
	<script type="text/javascript" src="/js/jquery-3.2.1.min.js"></script>
	<script type="text/javascript">
		$('.m-form-item button').click(function(){
			var username = $('.m-form-item input[type="text"]').val();
			var pwd = $('.m-form-item input[type="password"]').val();
			$.ajax({
				url: '/login/login',
				type: 'get',
				data:{
					username: username,
					password: pwd
				},
				dataType: 'json',
				success: function(obj){
					if(obj.code == 1){
						window.location.href = '/log/showLog';
					}else{
					    alert(obj.msg);
					}
				}
			})
		})
	</script>
</body>
</html>